package com.ruoyi.zlkc.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zlkc.mapper.ZlkcUserMapper;
import com.ruoyi.zlkc.domain.ZlkcUser;
import com.ruoyi.zlkc.service.IZlkcUserService;

/**
 * 智领康程用户Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-04
 */
@Service
public class ZlkcUserServiceImpl implements IZlkcUserService 
{
    @Autowired
    private ZlkcUserMapper zlkcUserMapper;

    /**
     * 查询智领康程用户
     * 
     * @param userId 智领康程用户主键
     * @return 智领康程用户
     */
    @Override
    public ZlkcUser selectZlkcUserByUserId(Long userId)
    {
        return zlkcUserMapper.selectZlkcUserByUserId(userId);
    }

    /**
     * 查询智领康程用户列表
     * 
     * @param zlkcUser 智领康程用户
     * @return 智领康程用户
     */
    @Override
    public List<ZlkcUser> selectZlkcUserList(ZlkcUser zlkcUser)
    {
        return zlkcUserMapper.selectZlkcUserList(zlkcUser);
    }

    /**
     * 新增智领康程用户
     * 
     * @param zlkcUser 智领康程用户
     * @return 结果
     */
    @Override
    public int insertZlkcUser(ZlkcUser zlkcUser)
    {
        zlkcUser.setCreateTime(DateUtils.getNowDate());
        return zlkcUserMapper.insertZlkcUser(zlkcUser);
    }

    /**
     * 修改智领康程用户
     * 
     * @param zlkcUser 智领康程用户
     * @return 结果
     */
    @Override
    public int updateZlkcUser(ZlkcUser zlkcUser)
    {
        zlkcUser.setUpdateTime(DateUtils.getNowDate());
        return zlkcUserMapper.updateZlkcUser(zlkcUser);
    }

    /**
     * 批量删除智领康程用户
     * 
     * @param userIds 需要删除的智领康程用户主键
     * @return 结果
     */
    @Override
    public int deleteZlkcUserByUserIds(Long[] userIds)
    {
        return zlkcUserMapper.deleteZlkcUserByUserIds(userIds);
    }

    /**
     * 删除智领康程用户信息
     * 
     * @param userId 智领康程用户主键
     * @return 结果
     */
    @Override
    public int deleteZlkcUserByUserId(Long userId)
    {
        return zlkcUserMapper.deleteZlkcUserByUserId(userId);
    }
}
